package com.hmdp.config;

import io.netty.handler.ssl.util.InsecureTrustManagerFactory;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: hm-dianping
 * @description:
 * @author: Feng
 * @create: 2023-03-10 06:49
 **/


@Configuration
public class RedissonConfig {

    @Bean
    public RedissonClient redissonClient(){
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.231.130:6379");
        return Redisson.create(config);
    }

    @Bean
    public RedissonClient redissonClient1(){
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.231.130:6380");
        return Redisson.create(config);
    }

    @Bean
    public RedissonClient redissonClient2(){
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.231.130:6381");
        return Redisson.create(config);
    }

}
